﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AlbumCreator.aspx.cs" Inherits="AlbumCreator" Title="Photo.RU" culture="auto" uiculture="auto"%>
<%@ Register TagPrefix="email" TagName="emailForm" Src="~/Controls/EmailForm.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link rel="Stylesheet" type="text/css" href="App_Themes/photoru/StyleSheet.css" />
    <script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="scripts/jquery.uploadify.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <input type="hidden" name="albumId" id="albumId" runat="server" />

        <div>
            <div class="logo">
                <asp:Image ID="ImageLogo" runat="server" ImageUrl="~/Images/logo.png" />
            </div>
        </div>
        <div>
            <asp:HyperLink ID="lnkHome" runat="server" Text="Home" 
                SkinID="albums" meta:resourcekey="lnkHome"></asp:HyperLink>
        </div>
        <div class="centerAlignment">
            <asp:Wizard ID="wizardAlbumCreate" runat="server"
                DisplaySideBar="False" ActiveStepIndex="0" Height="136px" Width="293px" 
                onnextbuttonclick="wizardAlbumCreate_NextButtonClick"
                onload="wizardAlbumCreate_Load">
                <FinishNavigationTemplate> </FinishNavigationTemplate>
                <StartNavigationTemplate>
                    <asp:Button ID="StartNextButton" runat="server" CommandName="MoveNext" 
                        Text="Next" meta:resourcekey="btnStart"/>
                </StartNavigationTemplate>
                <StepNavigationTemplate>
                    <asp:Button ID="StepNextButton" runat="server" CommandName="MoveNext" 
                        Text="Next" meta:resourcekey="btnNext"/>
                </StepNavigationTemplate>
                <WizardSteps>
                    <asp:WizardStep ID="stepCreatealbum" runat="server" title="Step 1">
                        <asp:Label ID="lblNameWizardStep1" runat="server" 
                            meta:resourceKey="lblNameWizardStep1" SkinID="lblWizardStep"></asp:Label>
                        <br />
                        <br />
                        <asp:Label ID="lblAlbumName" runat="server" meta:resourceKey="lblAlbumName"></asp:Label>
                       
                        <asp:TextBox ID="txtBoxAlbumName" runat="server" CssClass="txtbox" ></asp:TextBox>
                        <br />
                        <br />
                    </asp:WizardStep>
                    <asp:WizardStep ID="stepUpload" runat="server" title="Step 2">
                        <asp:Label ID="lblNameWizardStep2" runat="server" 
                            meta:resourceKey="lblNameWizardStep2" SkinID="lblWizardStep"></asp:Label>
                        <br />
                        <br />                       
                        <div style="padding: 40px" class="centerAlignment">
                            <asp:FileUpload runat="server" ID="FileUploader"></asp:FileUpload>
                            <br />
                            <br />                                                    
                            <asp:CheckBox ID="chkboxSendMail" runat="server" />
                            <asp:Label ID="lblSendMailCheckbox" runat="server" 
                                Text="Send e-mail notification" meta:resourceKey="lblMail"></asp:Label>
                        </div>
                    </asp:WizardStep>

                    <asp:WizardStep runat="server" Title="Step 3" ID="stepSendNotification">
                    <asp:Label ID="lblNameWizardStep3" runat="server" meta:resourceKey="lblNameWizardStep3"
                      SkinID="lblWizardStep"></asp:Label>
                        <email:emailForm ID="emailControl" runat="server" />

                        <div class="centerAlignment">
                          <asp:Button ID="btnSend" runat="server" Text="Send" meta:resourceKey="btnSend" OnClick="btnSend_Click" />
                        </div>
                        <br />
                        <br />
                    </asp:WizardStep>

                    <asp:WizardStep runat="server" Title="Step 4" ID="Complete">
                        <asp:Label ID="lblFinish" runat="server" Text="Album created successfully!" meta:resourceKey="lblFinish"></asp:Label>
                        <br />
                        <br />
                        <asp:Button ID="FinishButton" runat="server" Text="Finish" 
                            meta:resourceKey="btnWizardFinished" OnClick="FinishButton_Click"/>
                    </asp:WizardStep>
                </WizardSteps>
            </asp:Wizard>
        </div>
    </form>
</body>
</html>
<script type="text/javascript">
    var id = document.getElementById("albumId").value
    $(window).load(
    function () {
        $("#<%=FileUploader.ClientID %>").fileUpload({
            'uploader': 'scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonImg': '<%=GetLocalResourceObject("BrowseFilesImg") %>',
            'script': 'Upload.ashx?ID='+id,
            'fileDesc': 'Image Files',
            'fileExt': '*.jpg;*.jpeg;*.gif;*.png',
            'multi': true,
            'auto': true
        });
    }
);
</script>
